
# ifndef __DFX_AUDIO_SOURCE_H__
# define __DFX_AUDIO_SOURCE_H__

# include "dfxWaveDataProvider.h"

namespace DFX
{
    class DFX_EXPORT AudioSource
    {
    protected:

        WaveDataProvider    *mWaveDataProvider;

    public:

        AudioSource()
            : mWaveDataProvider(NULL)
        {
        }

        virtual ~AudioSource()
        {
        }

        WaveDataProvider* GetWaveDataProvider() const
        {
            return mWaveDataProvider;
        }

        virtual bool IsPlaying() const = 0;

        virtual void Play() = 0;
        virtual void Stop() = 0;
        virtual void Pause() = 0;        

        virtual void LoopSound(bool loop) = 0;
        virtual void SetVolume(Float32 volume) = 0;

        virtual void Update(Float32 deltaSeconds) = 0;
        virtual void BindWaveForm(WaveDataProvider *wave) = 0;
    };

    typedef std::vector<AudioSource*>   AudioSourceArray;
    typedef AudioSourceArray::iterator  AudioSourceIterator;
}

# endif